package com.jzo2o.customer.controller.worker;


import com.jzo2o.customer.model.dto.request.WorkerCertificationAuditAddReqDTO;
import com.jzo2o.customer.service.IWorkerCertificationAuditService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;
import lombok.extern.slf4j.Slf4j;
import org.springframework.web.bind.annotation.*;

import org.springframework.stereotype.Controller;

/**
 * <p>
 * 服务人员认证审核表 前端控制器
 * </p>
 *
 * @author itlxc
 * @since 2024-10-14
 */
@RestController("workerWorkerCertificationAuditController")
@RequestMapping("/worker/worker-certification-audit")
@RequiredArgsConstructor
@Api(tags = "服务端 - 服务人员认证审核相关接口")
@Slf4j
public class WorkerCertificationAuditController {

    private final IWorkerCertificationAuditService workerCertificationAuditService;

    @PostMapping
    @ApiOperation("服务端提交认证申请")
    public void submit(@RequestBody WorkerCertificationAuditAddReqDTO dto) {
        log.info("服务端提交认证申请参数：{}", dto);
        workerCertificationAuditService.submit(dto);
    }

    @GetMapping("/rejectReason")
    @ApiOperation("查询最新的驳回原因")
    public String rejectReason() {
        log.info("查询最新的驳回原因");
        return workerCertificationAuditService.getRejectReason();
    }
}
